home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_31508.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  38 lines

  1. -- card: 31508 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. example:
  11.  
  12.    float   square(float);
  13.  
  14. It is common practice to place lists of function prototype declarations in header files*.
  15.  
  16. Note that pre-ANSI C code does not use complete function prototype declarations.  Rather, a function is declared by stating the type of its return value and following the function identifier with empty parentheses to distinguish it as a function rather than a variable:
  17.  
  18.     float  square();
  19.  
  20. The default return type for functions is int, and many pre-ANSI programs took advantage of this by not declaring those functions which returned ints at all.
  21.  
  22. While most ANSI C compilers permit these short cuts, it is considered good practice to provide full prototype declarations for all functions.  In addition to aiding program 
  23.  
  24. -- part contents for background part 7
  25. ----- text -----
  26. 94
  27.  
  28. -- part contents for background part 29
  29. ----- text -----
  30. 52189
  31.  
  32. -- part contents for background part 27
  33. ----- text -----
  34. File inclusion
  35.  
  36. -- part contents for background part 20
  37. ----- text -----
  38. File inclusion - p175